<el-card shadow="never">
  <div v-show="!show">
      <div class="table-operator">
          <el-button icon="el-icon-plus" size="small" class="addBtn" type="primary" @click="handleAdd">新增</el-button>
      </div>
      <el-table border v-loading="loading" size="small" :data="dataSource"
          :header-cell-style="{background:'#eef1f6',color:'#606266'}">
<!--            <el-table-column prop="code" label="盘点单编码" sortable>-->
              <!-- <template slot-scope="scope">
                  <router-link to='/queryDisplay/check'>
                      <a  target="_blank" class="buttonText">{{scope.row.code}}</a>
                  </router-link>
              </template> -->
          </el-table-column>
          <el-table-column label="盘点单名称" sortable>
            <template slot-scope="scope">
              <el-button type="text" @click="cellClick(scope.row)" >{{scope.row.name}}</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" label="创建时间" sortable></el-table-column>
          <el-table-column prop="headPersonnel" label="负责人" sortable></el-table-column>
          <el-table-column prop="startDate" label="计划开始时间" sortable></el-table-column>
          <el-table-column prop="endDate" label="计划结束时间"></el-table-column>
          <el-table-column prop="state" label="状态">
              <template slot-scope="scope">
                  <el-tag v-if="scope.row.state == 1" type="info" effect="dark">制定</el-tag>
                  <el-tag v-else-if="scope.row.state == 2" type="" effect="dark">盘点中</el-tag>
                  <el-tag v-else type="success" effect="dark">盘点结束</el-tag>
              </template>
          </el-table-column>
          <el-table-column width="150" fixed="right" label="操作">
              <template slot-scope="scope">
                  <el-button @click="handleDetail(scope.row)" type="text">查看</el-button>
                  <span v-if="scope.row.state != 3">|</span>
                  <!-- <div v-if="scope.row.state == 1 || scope.row.state == 2" > -->
                  <el-popconfirm v-if="scope.row.state != 3" title="确定结束盘点任务吗？" placement="top-start"
                      @onConfirm="handleFinish(scope.row.id)">
                      <el-button slot="reference" type="text">结束盘点</el-button>
                  </el-popconfirm>
  <!-- <el-button @click="finishInventory(scope.row)" type="text" >结束盘点</el-button> -->
               </template>
          </el-table-column>
      </el-table>
    <pagination :total="ipagination.total" :page.sync="ipagination.current" :limit.sync="ipagination.pageSize"
        @pagination="loadData"></pagination>
  </div>
  <check-add ref="modalForm" @ok="modalFormOk"></check-add>

<!--  <el-button type="primary">主要按钮</el-button>-->
<!--  <a @click="goBack" v-show="show" class="a">返回</a>-->
  <check ref="checkForm" v-show="show"  @goBack="goBack" ></check>
  </div>
</el-card>
